package com.xiaomaoguai.cloud.controller;

import com.xiaomaoguai.cloud.feign.UserFeign;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * feign 调用 jaeger-provider-user 服务
 *
 * @author August.zhang
 * @version v1.0.0
 * @date 2020/1/6 20:01
 * @since JDK 1.8
 */
@RestController
@AllArgsConstructor
public class FeignConsumerController {

	private final UserFeign userFeign;

	@GetMapping("/{id}")
	public String getUser(@PathVariable Long id) {
		return userFeign.findById(id);
	}

}
